#include <iostream>
using namespace std;

char* my_strstr(char* str1,char* str2)
{
  if(*str2=='\0'){
    return str1;
  }

  char *p1=str1;
  while(*p1!='\0'){
    char *p_start=p1;
    char *p2=str2;
    while(*p1!='\0'&&*p2!='\0'&&*p1==*p2)
    {
      p1++;
      p2++;
    }

    if(*p2=='\0')
    {
      return p_start;
    }
    p1=p_start+1;
  }
  return nullptr;
}
